
class WindowUtils {
    public DEVICE_W: number = 0;
    public DEVICE_H: number = 0;
    public DESIGN_W: number = 720;
    public DESIGN_H: number = 1280;
    public SCALE_X: number = 1;
    public SCALE_Y: number = 1;
    public SCALE_FIT: number = 1;
    public IS_PAD = false;
    public IS_LONG = false;

    public constructor() {
    }

    public init() {
        const { width, height } = cc.view.getVisibleSize();
        this.DEVICE_W = width;
        this.DEVICE_H = height;
        this.SCALE_X = width / this.DESIGN_W;
        this.SCALE_Y = height / this.DESIGN_H;
        this.SCALE_FIT = this.SCALE_X < this.SCALE_Y ? this.SCALE_X : this.SCALE_Y;
    }
}

export default new WindowUtils();